function doReg(){
	layer.load(1);
	
	$.ajax({
		url:ajax_host + 'userReg.act',
		type : 'get',
		dataType:'JSON',
		data:{
            uName:val('uName'),
            uAccount:val('uAccount'),
			password:val('password'),
			checkPassword:val('checkPassword'),
			sex:val('sex','radio'),
			phone:val('phone')
			
		},
		
		success : function(resp){
			console.log(resp);
			if(resp.success){
                

				layer.closeAll('loading');
				layer.confirm('注册成功',{ btn:['确定']},function(){
				window.location.href = "page.act?p="+resp.date+"&int="+Math.random();
				});
			}else{
				layer.closeAll('loading');
				layer.alert(resp.errmsg);
			}
			
		}
		
	})
	
}

function fanhui(){
	window.location.href = "page.act?p="+"login"+"&int="+Math.random();
}

function gethead(){
    $('#uploaderExample').uploader({
        autoUpload: true,            //当选择文件后立即自动进行上传操作
        chunk_size:0,
        url: 'upload.act' , //文件上传提交地址
       
       filters:{
       //获得数据库有关类型进行动态过滤
       mime_types: [
        {title: '图片', extensions: 'jpg,gif,png'},
        {title: '图标', extensions: 'ico'}
       ],
       prevent_duplicates: true
       },
       responseHandler:function(responseObject, file){
           //服务器的响应
           layer.alert('上传成功');
           console.log(responseObject, file);
          
       }
       });
}